package top.mczhengyi.learn.hello.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.mczhengyi.learn.hello.bean.Car;

@Slf4j
@RestController
public class HelloController {

    @Autowired
    Car car;

    @RequestMapping("/car")
    public Car getCar() {
        log.info("请求/car --> " + car);
        return car;
    }

    @RequestMapping("/hello")
    public String hello() {
        return "Hello World";
    }
}
